home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Demos / ByCompany / FirstClass / Tailor / Tailor.app / EngineScan.data < prev    next >
Text File  |  1994-01-17  |  17KB  |  2,770 lines

  1. %! Adobe packPS Version 2.0 (9)
  2.  
  3. /revision
  4. 14
  5. def
  6. /product
  7. (Tailor PostScript Input Engine)
  8. def
  9. 100
  10. dict
  11. dup
  12. /TailorEngineScanDict
  13. exch
  14. def
  15. begin
  16. /originalscale
  17. /scale
  18. load
  19. def
  20. /originaltranslate
  21. /translate
  22. load
  23. def
  24. /origdefinefont
  25. /definefont
  26. load
  27. def
  28. /origfindfont
  29. /findfont
  30. load
  31. def
  32. /originalfindfont
  33. {
  34. 1
  35. dict
  36. begin
  37. /definefont
  38. //origdefinefont
  39. def
  40. /setshared
  41. {pop}
  42. def
  43. /setglobal
  44. {pop}
  45. def
  46. //origfindfont
  47. exec
  48. end
  49. }
  50. bind
  51. def
  52. /showprogress
  53. {
  54. //EngineFeedbackDict
  55. begin
  56. currentfile
  57. bytesavailable
  58. leftbytes
  59. add
  60. totalbytes
  61. div
  62. 1
  63. exch
  64. sub
  65. dup
  66. progress
  67. sub
  68. 0.01
  69. ge
  70. {
  71. dup
  72. /progress
  73. exch
  74. def
  75. gsave
  76. EngineFeedbackGstate
  77. setgstate
  78. 0
  79. exch
  80. 0
  81. exch
  82. 1
  83. rectfill
  84. grestore
  85. }
  86. {
  87. pop
  88. }
  89. ifelse
  90. end
  91. }
  92. bind
  93. def
  94. //EngineFeedbackDict
  95. /progress
  96. 0
  97. put
  98. true
  99. setglobal
  100. /enginestate
  101. 10
  102. dict
  103. def
  104. false
  105. setglobal
  106. //enginestate
  107. /tag
  108. 0
  109. put
  110. /setallchanged
  111. {
  112. //enginestate
  113. /matr
  114. true
  115. put
  116. //enginestate
  117. /color
  118. true
  119. put
  120. //enginestate
  121. /font
  122. true
  123. put
  124. //enginestate
  125. /line
  126. true
  127. put
  128. //enginestate
  129. /dash
  130. true
  131. put
  132. //enginestate
  133. /clip
  134. true
  135. put
  136. }
  137. bind
  138. def
  139. //setallchanged
  140. exec
  141. /enginecache
  142. 10
  143. dict
  144. def
  145. enginecache
  146. /mapping
  147. 2
  148. dict
  149. put
  150. enginecache
  151. /bitmap
  152. 15
  153. dict
  154. put
  155. //EngineSubFontName
  156. findfont
  157. pop
  158. /NoFontName
  159. (?)
  160. def
  161. /holdchar
  162. 1
  163. string
  164. def
  165. /holdstring
  166. 1000
  167. string
  168. def
  169. /holdname
  170. 100
  171. string
  172. def
  173. /holdcolor
  174. 250
  175. string
  176. def
  177. /holdmatrix
  178. matrix
  179. def
  180. /prtnum
  181. {
  182. //holdstring
  183. cvs
  184. print
  185. ( )
  186. print
  187. }
  188. bind
  189. def
  190. /prtpath
  191. {
  192. {
  193. (M )
  194. print
  195. //prtnum
  196. exec
  197. //prtnum
  198. exec
  199. }
  200. {
  201. (L )
  202. print
  203. //prtnum
  204. exec
  205. //prtnum
  206. exec
  207. }
  208. {
  209. (C )
  210. print
  211. //prtnum
  212. exec
  213. //prtnum
  214. exec
  215. //prtnum
  216. exec
  217. //prtnum
  218. exec
  219. //prtnum
  220. exec
  221. //prtnum
  222. exec}
  223. {
  224. (O )
  225. print
  226. }
  227. pathforall
  228. }
  229. bind
  230. def
  231. /getinversemapping
  232. {
  233. mapping
  234. target
  235. known
  236. {
  237. /inverse
  238. mapping
  239. target
  240. get
  241. def
  242. }{
  243. /inverse
  244. 230
  245. dict
  246. def
  247. 0
  248. target
  249. {inverse
  250. exch
  251. 2
  252. index
  253. put
  254. 1
  255. add}
  256. forall
  257. pop
  258. mapping
  259. target
  260. inverse
  261. put
  262. }
  263. ifelse
  264. }
  265. bind
  266. def
  267. /prtstring
  268. {
  269. //enginecache
  270. begin
  271. source
  272. target
  273. eq
  274. {
  275. (%stdout)(w)
  276. file
  277. exch
  278. writehexstring
  279. }{
  280. //getinversemapping
  281. exec
  282. //holdstring
  283. exch
  284. 0
  285. exch
  286. {
  287. source
  288. exch
  289. get
  290. inverse
  291. 1
  292. index
  293. known
  294. {
  295. inverse
  296. exch
  297. get
  298. }
  299. {
  300. pop
  301. inverse
  302. /.notdef
  303. get
  304. }
  305. ifelse
  306. 3
  307. copy
  308. put
  309. pop
  310. 1
  311. add
  312. }
  313. forall
  314. 0
  315. exch
  316. getinterval
  317. (%stdout)(w)
  318. file
  319. exch
  320. writehexstring
  321. }
  322. ifelse
  323. end
  324. ( )
  325. print
  326. }
  327. bind
  328. def
  329. /prtmatr
  330. {
  331. //enginestate
  332. /matr
  333. get
  334. {
  335. //enginestate
  336. /matr
  337. false
  338. put
  339. (<M )
  340. print
  341. //holdmatrix
  342. currentmatrix
  343. {//prtnum
  344. exec}
  345. forall
  346. (>\n)
  347. print
  348. }
  349. if
  350. }
  351. bind
  352. def
  353. /prtcolor
  354. {
  355. //enginestate
  356. /color
  357. get
  358. {
  359. //enginestate
  360. /color
  361. false
  362. put
  363. (<C )
  364. print
  365. mark
  366. currentcolor
  367. dup
  368. type
  369. /integertype
  370. eq
  371. {
  372. currentcolorspace
  373. aload
  374. pop
  375. print
  376. }
  377. {
  378. counttomark
  379. dup
  380. //prtnum
  381. exec
  382. {//prtnum
  383. exec}
  384. repeat
  385. }
  386. ifelse
  387. cleartomark
  388. (>\n)
  389. print
  390. }
  391. if
  392. }
  393. bind
  394. def
  395. /normfontname
  396. {
  397. //holdstring
  398. cvs
  399. (_)
  400. search
  401. {pop
  402. pop}
  403. if
  404. 0
  405. exch
  406. {
  407. dup
  408. 45
  409. eq
  410. 1
  411. index
  412. 48
  413. ge
  414. 2
  415. index
  416. 57
  417. le
  418. and
  419. or
  420. 1
  421. index
  422. 65
  423. ge
  424. 2
  425. index
  426. 90
  427. le
  428. and
  429. or
  430. 1
  431. index
  432. 97
  433. ge
  434. 2
  435. index
  436. 122
  437. le
  438. and
  439. or
  440. {//holdname
  441. exch
  442. 2
  443. index
  444. exch
  445. put
  446. 1
  447. add}
  448. {pop
  449. dup
  450. 1
  451. ge
  452. {exit}
  453. if}
  454. ifelse
  455. }
  456. forall
  457. //holdname
  458. exch
  459. 0
  460. exch
  461. getinterval
  462. }
  463. bind
  464. def
  465. /prtfont
  466. {
  467. //enginestate
  468. /font
  469. get
  470. {
  471. //enginestate
  472. /font
  473. false
  474. put
  475. //enginestate
  476. /outline
  477. false
  478. put
  479. (<A )
  480. print
  481. currentfont
  482. /FontName
  483. known
  484. {
  485. currentfont
  486. /FontName
  487. get
  488. //normfontname
  489. exec
  490. }
  491. {
  492. //NoFontName
  493. }
  494. ifelse
  495. dup
  496. print
  497. ( )
  498. print
  499. cvn
  500. //EngineUseOutline
  501. {
  502. dup
  503. //originalfindfont
  504. exec
  505. pop
  506. dup
  507. SharedFontDirectory
  508. exch
  509. known
  510. not
  511. {
  512. currentfont
  513. /TailorEngineSubClone
  514. known
  515. not
  516. {
  517. //enginestate
  518. /outline
  519. true
  520. put
  521. }
  522. if
  523. }
  524. if
  525. }
  526. if
  527. SharedFontDirectory
  528. 1
  529. index
  530. known
  531. not
  532. {
  533. pop
  534. //EngineSubFontName
  535. }
  536. if
  537. SharedFontDirectory
  538. exch
  539. get
  540. /Encoding
  541. get
  542. //enginecache
  543. exch
  544. /target
  545. exch
  546. put
  547. //enginecache
  548. /source
  549. currentfont
  550. /Encoding
  551. get
  552. put
  553. currentfont
  554. /ScaleMatrix
  555. known
  556. {currentfont
  557. /ScaleMatrix
  558. get}
  559. {[1
  560. 0
  561. 0
  562. 1
  563. 0
  564. 0]}
  565. ifelse
  566. {//prtnum
  567. exec}
  568. forall
  569. (>\n)
  570. print
  571. }
  572. if
  573. }
  574. bind
  575. def
  576. /prtline
  577. {
  578. //enginestate
  579. /line
  580. get
  581. {
  582. //enginestate
  583. /line
  584. false
  585. put
  586. (<L )
  587. print
  588. currentlinewidth
  589. //prtnum
  590. exec
  591. currentlinecap
  592. //prtnum
  593. exec
  594. currentlinejoin
  595. //prtnum
  596. exec
  597. currentmiterlimit
  598. //prtnum
  599. exec
  600. (>\n)
  601. print
  602. }
  603. if
  604. }
  605. bind
  606. def
  607. /prtdash
  608. {
  609. //enginestate
  610. /dash
  611. get
  612. {
  613. //enginestate
  614. /dash
  615. false
  616. put
  617. (<D )
  618. print
  619. currentdash
  620. //prtnum
  621. exec
  622. {//prtnum
  623. exec}
  624. forall
  625. (>\n)
  626. print
  627. }
  628. if
  629. }
  630. bind
  631. def
  632. /prtclip
  633. {
  634. //enginestate
  635. /clip
  636. get
  637. {
  638. //enginestate
  639. /clip
  640. false
  641. put
  642. (<I )
  643. print
  644. currenthalftonephase
  645. pop
  646. prtnum
  647. (>\n)
  648. print
  649. }
  650. if
  651. }
  652. bind
  653. def
  654. /restore
  655. {//setallchanged
  656. exec
  657. restore
  658. }
  659. bind
  660. def
  661. /grestore
  662. {//setallchanged
  663. exec
  664. grestore
  665. }
  666. bind
  667. def
  668. /grestoreall
  669. {//setallchanged
  670. exec
  671. grestoreall
  672. }
  673. bind
  674. def
  675. /setgstate
  676. {//setallchanged
  677. exec
  678. setgstate
  679. }
  680. bind
  681. def
  682. /setpagedevice
  683. {//setallchanged
  684. exec
  685. setpagedevice
  686. }
  687. bind
  688. def
  689. /initgraphics
  690. {//setallchanged
  691. exec
  692. initgraphics
  693. }
  694. bind
  695. def
  696. /initmatrix
  697. {//enginestate
  698. /matr
  699. true
  700. put
  701. initmatrix
  702. }
  703. bind
  704. def
  705. /setmatrix
  706. {//enginestate
  707. /matr
  708. true
  709. put
  710. setmatrix
  711. }
  712. bind
  713. def
  714. /translate
  715. {//enginestate
  716. /matr
  717. true
  718. put
  719. translate
  720. }
  721. bind
  722. def
  723. /scale
  724. {//enginestate
  725. /matr
  726. true
  727. put
  728. scale
  729. }
  730. bind
  731. def
  732. /rotate
  733. {//enginestate
  734. /matr
  735. true
  736. put
  737. rotate
  738. }
  739. bind
  740. def
  741. /concat
  742. {//enginestate
  743. /matr
  744. true
  745. put
  746. concat
  747. }
  748. bind
  749. def
  750. /nxsetgray
  751. {//enginestate
  752. /color
  753. true
  754. put
  755. setgray
  756. }
  757. bind
  758. def
  759. /nxsetrgbcolor
  760. {//enginestate
  761. /color
  762. true
  763. put
  764. setrgbcolor
  765. }
  766. bind
  767. def
  768. /setgray
  769. {//enginestate
  770. /color
  771. true
  772. put
  773. setgray
  774. }
  775. bind
  776. def
  777. /sethsbcolor
  778. {//enginestate
  779. /color
  780. true
  781. put
  782. sethsbcolor
  783. }
  784. bind
  785. def
  786. /setrgbcolor
  787. {//enginestate
  788. /color
  789. true
  790. put
  791. setrgbcolor
  792. }
  793. bind
  794. def
  795. /setcmykcolor
  796. {//enginestate
  797. /color
  798. true
  799. put
  800. setcmykcolor
  801. }
  802. bind
  803. def
  804. /setcolor
  805. {//enginestate
  806. /color
  807. true
  808. put
  809. setcolor
  810. }
  811. bind
  812. def
  813. /setfont
  814. {//enginestate
  815. /font
  816. true
  817. put
  818. setfont
  819. }
  820. bind
  821. def
  822. /selectfont
  823. {//enginestate
  824. /font
  825. true
  826. put
  827. selectfont
  828. }
  829. bind
  830. def
  831. /setlinewidth
  832. {//enginestate
  833. /line
  834. true
  835. put
  836. setlinewidth
  837. }
  838. bind
  839. def
  840. /setlinecap
  841. {//enginestate
  842. /line
  843. true
  844. put
  845. setlinecap
  846. }
  847. bind
  848. def
  849. /setlinejoin
  850. {//enginestate
  851. /line
  852. true
  853. put
  854. setlinejoin
  855. }
  856. bind
  857. def
  858. /setmiterlimit
  859. {//enginestate
  860. /line
  861. true
  862. put
  863. setmiterlimit
  864. }
  865. bind
  866. def
  867. /setdash
  868. {//enginestate
  869. /dash
  870. true
  871. put
  872. setdash
  873. }
  874. bind
  875. def
  876. /_NXSetCMYKOrRGB
  877. {
  878. (6 )
  879. //holdcolor
  880. copy
  881. pop
  882. pop
  883. pop
  884. pop
  885. 2
  886. 4
  887. {
  888. exch
  889. //holdstring
  890. cvs
  891. dup
  892. length
  893. exch
  894. //holdcolor
  895. exch
  896. 3
  897. index
  898. exch
  899. putinterval
  900. add
  901. //holdcolor
  902. 1
  903. index
  904. ( )
  905. putinterval
  906. 1
  907. add
  908. }
  909. repeat
  910. 2
  911. {
  912. //holdcolor
  913. 1
  914. index
  915. (\()
  916. putinterval
  917. 1
  918. add
  919. exch
  920. dup
  921. length
  922. exch
  923. //holdcolor
  924. exch
  925. 3
  926. index
  927. exch
  928. putinterval
  929. add
  930. //holdcolor
  931. 1
  932. index
  933. (\))
  934. putinterval
  935. 1
  936. add
  937. }
  938. repeat
  939. [
  940. /Indexed
  941. /DeviceGray
  942. 3
  943. index
  944. 1
  945. sub
  946. //holdcolor
  947. 0
  948. 6
  949. index
  950. getinterval
  951. ]
  952. setcolorspace
  953. pop
  954. //enginestate
  955. /color
  956. true
  957. put
  958. }
  959. bind
  960. def
  961. /initclip
  962. {
  963. 0
  964. 0
  965. sethalftonephase
  966. //enginestate
  967. /clip
  968. true
  969. put
  970. initclip
  971. }
  972. bind
  973. def
  974. /clip
  975. {
  976. //prtmatr
  977. exec
  978. //enginestate
  979. begin
  980. /tag
  981. tag
  982. 1
  983. add
  984. def
  985. (<P )
  986. print
  987. tag
  988. prtnum
  989. currenthalftonephase
  990. pop
  991. prtnum
  992. (N )
  993. print
  994. //prtpath
  995. exec
  996. (>\n)
  997. print
  998. tag
  999. 0
  1000. sethalftonephase
  1001. /clip
  1002. true
  1003. def
  1004. end
  1005. clip
  1006. }
  1007. bind
  1008. def
  1009. /eoclip
  1010. {
  1011. //prtmatr
  1012. exec
  1013. //enginestate
  1014. begin
  1015. /tag
  1016. tag
  1017. 1
  1018. add
  1019. def
  1020. (<P )
  1021. print
  1022. tag
  1023. prtnum
  1024. currenthalftonephase
  1025. pop
  1026. prtnum
  1027. (E )
  1028. print
  1029. //prtpath
  1030. exec
  1031. (>\n)
  1032. print
  1033. tag
  1034. 0
  1035. sethalftonephase
  1036. /clip
  1037. true
  1038. def
  1039. end
  1040. eoclip
  1041. }
  1042. bind
  1043. def
  1044. /sethalftonephase
  1045. {pop
  1046. pop}
  1047. def
  1048. /findfont
  1049. {
  1050. dup
  1051. //originalfindfont
  1052. exec
  1053. dup
  1054. /FontType
  1055. get
  1056. 1
  1057. ne
  1058. {
  1059. pop
  1060. /Courier
  1061. //originalfindfont
  1062. exec
  1063. ($$Found Non-Type-1: )
  1064. print
  1065. 1
  1066. index
  1067. prtnum
  1068. ($$\n)
  1069. print
  1070. }
  1071. if
  1072. dup
  1073. /FontName
  1074. known
  1075. {
  1076. dup
  1077. /FontName
  1078. get
  1079. /Courier
  1080. eq
  1081. {
  1082. 1
  1083. index
  1084. //normfontname
  1085. exec
  1086. /Courier
  1087. ne
  1088. {
  1089. pop
  1090. //EngineSubFontName
  1091. //originalfindfont
  1092. exec
  1093. dup
  1094. length
  1095. 1
  1096. add
  1097. dict
  1098. dup
  1099. begin
  1100. exch
  1101. {
  1102. 1
  1103. index
  1104. /FID
  1105. ne
  1106. {def}{pop
  1107. pop}
  1108. ifelse
  1109. }
  1110. forall
  1111. /FontName
  1112. 2
  1113. index
  1114. def
  1115. /TailorEngineSubClone
  1116. true
  1117. def
  1118. end
  1119. 1
  1120. index
  1121. exch
  1122. //definefont
  1123. exec
  1124. ($$Cloned Unavailable: )
  1125. print
  1126. dup
  1127. /FontName
  1128. get
  1129. prtnum
  1130. ($$\n)
  1131. print
  1132. }
  1133. if
  1134. }
  1135. if
  1136. }
  1137. if
  1138. exch
  1139. pop
  1140. }
  1141. bind
  1142. def
  1143. /findresource
  1144. {
  1145. dup
  1146. /Font
  1147. eq
  1148. {
  1149. pop
  1150. findfont
  1151. }{
  1152. findresource
  1153. }
  1154. ifelse
  1155. }
  1156. bind
  1157. def
  1158. /definefont
  1159. {
  1160. dup
  1161. /FontType
  1162. get
  1163. 1
  1164. ne
  1165. {
  1166. 1
  1167. index
  1168. //normfontname
  1169. exec
  1170. dup
  1171. //originalfindfont
  1172. exec
  1173. dup
  1174. /FontName
  1175. get
  1176. /Courier
  1177. eq
  1178. {
  1179. 1
  1180. index
  1181. /Courier
  1182. ne
  1183. {
  1184. pop
  1185. //EngineSubFontName
  1186. //originalfindfont
  1187. exec
  1188. }
  1189. if
  1190. }
  1191. if
  1192. dup
  1193. length
  1194. 2
  1195. add
  1196. dict
  1197. dup
  1198. begin
  1199. exch
  1200. {
  1201. 1
  1202. index
  1203. /FID
  1204. ne
  1205. {def}{pop
  1206. pop}
  1207. ifelse
  1208. }
  1209. forall
  1210. /FontName
  1211. 4
  1212. index
  1213. def
  1214. /Encoding
  1215. 3
  1216. index
  1217. /Encoding
  1218. get
  1219. def
  1220. /TailorEngineSubClone
  1221. true
  1222. def
  1223. 2
  1224. index
  1225. {
  1226. currentdict
  1227. 2
  1228. index
  1229. known
  1230. {pop
  1231. pop}{def}
  1232. ifelse
  1233. }
  1234. forall
  1235. end
  1236. exch
  1237. pop
  1238. exch
  1239. pop
  1240. ($$Cloned Non-Type-1: )
  1241. print
  1242. dup
  1243. /FontName
  1244. get
  1245. prtnum
  1246. ($$\n)
  1247. print
  1248. }
  1249. {
  1250. 1
  1251. index
  1252. //normfontname
  1253. exec
  1254. //originalfindfont
  1255. exec
  1256. pop
  1257. }
  1258. ifelse
  1259. //definefont
  1260. exec
  1261. }
  1262. bind
  1263. def
  1264. /defineresource
  1265. {
  1266. dup
  1267. /Font
  1268. eq
  1269. {
  1270. pop
  1271. definefont
  1272. }{
  1273. defineresource
  1274. }
  1275. ifelse
  1276. }
  1277. bind
  1278. def
  1279. /eexec
  1280. {
  1281. count
  1282. 1
  1283. gt
  1284. {
  1285. 1
  1286. index
  1287. type
  1288. /dicttype
  1289. eq
  1290. {
  1291. 1
  1292. index
  1293. /FontName
  1294. known
  1295. {
  1296. 1
  1297. index
  1298. /FontName
  1299. get
  1300. //normfontname
  1301. exec
  1302. //originalfindfont
  1303. exec
  1304. pop
  1305. }
  1306. if
  1307. }
  1308. if
  1309. }
  1310. if
  1311. //eexec
  1312. exec
  1313. }
  1314. bind
  1315. def
  1316. /stroke
  1317. {
  1318. //prtmatr
  1319. exec
  1320. //prtcolor
  1321. exec
  1322. //prtline
  1323. exec
  1324. //prtdash
  1325. exec
  1326. //prtclip
  1327. exec
  1328. (<S )
  1329. print
  1330. //prtpath
  1331. exec
  1332. (>\n)
  1333. print
  1334. newpath
  1335. //showprogress
  1336. exec
  1337. }
  1338. bind
  1339. def
  1340. /fill
  1341. {
  1342. //prtmatr
  1343. exec
  1344. //prtcolor
  1345. exec
  1346. //prtclip
  1347. exec
  1348. (<F N )
  1349. print
  1350. //prtpath
  1351. exec
  1352. (>\n)
  1353. print
  1354. newpath
  1355. //showprogress
  1356. exec
  1357. }
  1358. bind
  1359. def
  1360. /eofill
  1361. {
  1362. //prtmatr
  1363. exec
  1364. //prtcolor
  1365. exec
  1366. //prtclip
  1367. exec
  1368. (<F E )
  1369. print
  1370. //prtpath
  1371. exec
  1372. (>\n)
  1373. print
  1374. newpath
  1375. //showprogress
  1376. exec
  1377. }
  1378. bind
  1379. def
  1380. /awidthshow
  1381. {
  1382. //prtmatr
  1383. exec
  1384. //prtcolor
  1385. exec
  1386. //prtfont
  1387. exec
  1388. //prtclip
  1389. exec
  1390. //enginestate
  1391. /outline
  1392. get
  1393. 7
  1394. copy
  1395. {(<O )}
  1396. {(<T )}
  1397. ifelse
  1398. print
  1399. currentpoint
  1400. //prtnum
  1401. exec
  1402. //prtnum
  1403. exec
  1404. //prtstring
  1405. exec
  1406. //prtnum
  1407. exec
  1408. //prtnum
  1409. exec
  1410. //prtnum
  1411. exec
  1412. //prtnum
  1413. exec
  1414. //prtnum
  1415. exec
  1416. (>\n)
  1417. print
  1418. {
  1419. gsave
  1420. 10
  1421. dict
  1422. begin
  1423. /cx
  1424. 6
  1425. index
  1426. def
  1427. /cy
  1428. 5
  1429. index
  1430. def
  1431. /char
  1432. 4
  1433. index
  1434. def
  1435. /ax
  1436. 3
  1437. index
  1438. def
  1439. /ay
  1440. 2
  1441. index
  1442. def
  1443. currentpoint
  1444. /y
  1445. exch
  1446. def
  1447. /x
  1448. exch
  1449. def
  1450. 20
  1451. 20
  1452. //originalscale
  1453. dup
  1454. {
  1455. newpath
  1456. 0
  1457. 0
  1458. moveto
  1459. //holdchar
  1460. dup
  1461. 0
  1462. 3
  1463. index
  1464. put
  1465. dup
  1466. true
  1467. charpath
  1468. x
  1469. neg
  1470. y
  1471. neg
  1472. //originaltranslate
  1473. fill
  1474. x
  1475. y
  1476. //originaltranslate
  1477. stringwidth
  1478. y
  1479. add
  1480. ay
  1481. add
  1482. exch
  1483. x
  1484. add
  1485. ax
  1486. add
  1487. exch
  1488. 3
  1489. -1
  1490. roll
  1491. char
  1492. eq
  1493. {
  1494. cy
  1495. add
  1496. exch
  1497. cx
  1498. add
  1499. exch
  1500. }
  1501. if
  1502. /y
  1503. exch
  1504. def
  1505. /x
  1506. exch
  1507. def
  1508. }
  1509. forall
  1510. end
  1511. (<Q>\n)
  1512. print
  1513. grestore
  1514. }
  1515. if
  1516. awidthshow
  1517. //showprogress
  1518. exec
  1519. }
  1520. bind
  1521. def
  1522. /show
  1523. {
  1524. 0
  1525. 0
  1526. 0
  1527. 0
  1528. 0
  1529. 6
  1530. -1
  1531. roll
  1532. //awidthshow
  1533. exec
  1534. }
  1535. bind
  1536. def
  1537. /ashow
  1538. {
  1539. 0
  1540. 0
  1541. 0
  1542. 6
  1543. -3
  1544. roll
  1545. //awidthshow
  1546. exec
  1547. }
  1548. bind
  1549. def
  1550. /widthshow
  1551. {
  1552. 0
  1553. exch
  1554. 0
  1555. exch
  1556. //awidthshow
  1557. exec
  1558. }
  1559. bind
  1560. def
  1561. /kshow
  1562. {
  1563. dup
  1564. length
  1565. 0
  1566. gt
  1567. {
  1568. dup
  1569. 0
  1570. 1
  1571. getinterval
  1572. show
  1573. //enginecache
  1574. exch
  1575. /kstring
  1576. exch
  1577. put
  1578. //enginecache
  1579. exch
  1580. /kproc
  1581. exch
  1582. put
  1583. //enginecache
  1584. /kindex
  1585. 0
  1586. put
  1587. //enginecache
  1588. /kstring
  1589. get
  1590. length
  1591. 1
  1592. sub
  1593. {
  1594. //enginecache
  1595. /kstring
  1596. get
  1597. //enginecache
  1598. /kindex
  1599. get
  1600. get
  1601. //enginecache
  1602. /kindex
  1603. 2
  1604. copy
  1605. get
  1606. 1
  1607. add
  1608. put
  1609. //enginecache
  1610. /kstring
  1611. get
  1612. //enginecache
  1613. /kindex
  1614. get
  1615. get
  1616. //enginecache
  1617. /kproc
  1618. get
  1619. exec
  1620. //enginecache
  1621. /kstring
  1622. get
  1623. //enginecache
  1624. /kindex
  1625. get
  1626. 1
  1627. getinterval
  1628. show
  1629. }
  1630. repeat
  1631. }
  1632. {
  1633. pop
  1634. pop
  1635. }
  1636. ifelse
  1637. }
  1638. bind
  1639. def
  1640. /glyphshow
  1641. {
  1642. //prtmatr
  1643. exec
  1644. //prtcolor
  1645. exec
  1646. //prtfont
  1647. exec
  1648. //prtclip
  1649. exec
  1650. //enginestate
  1651. /outline
  1652. get
  1653. 2
  1654. copy
  1655. {(<O )}
  1656. {(<T )}
  1657. ifelse
  1658. print
  1659. currentpoint
  1660. //prtnum
  1661. exec
  1662. //prtnum
  1663. exec
  1664. //enginecache
  1665. begin
  1666. //getinversemapping
  1667. exec
  1668. inverse
  1669. 1
  1670. index
  1671. known
  1672. {
  1673. inverse
  1674. exch
  1675. get
  1676. }
  1677. {
  1678. pop
  1679. inverse
  1680. /.notdef
  1681. get
  1682. }
  1683. ifelse
  1684. end
  1685. //holdstring
  1686. exch
  1687. 0
  1688. exch
  1689. put
  1690. //holdstring
  1691. 0
  1692. 1
  1693. getinterval
  1694. (%stdout)(w)
  1695. file
  1696. exch
  1697. writehexstring
  1698. ( 0 0 0 0 0>\n)
  1699. print
  1700. {
  1701. gsave
  1702. 0
  1703. currentfont
  1704. /Encoding
  1705. get
  1706. {2
  1707. index
  1708. eq
  1709. {exit}
  1710. if
  1711. 1
  1712. add}
  1713. forall
  1714. dup
  1715. 256
  1716. ge
  1717. {
  1718. pop
  1719. 32
  1720. }
  1721. if
  1722. //holdchar
  1723. exch
  1724. 0
  1725. exch
  1726. put
  1727. currentpoint
  1728. 20
  1729. 20
  1730. //originalscale
  1731. newpath
  1732. moveto
  1733. //holdchar
  1734. true
  1735. charpath
  1736. fill
  1737. (<Q>\n)
  1738. print
  1739. grestore
  1740. }
  1741. if
  1742. glyphshow
  1743. //showprogress
  1744. exec
  1745. }
  1746. bind
  1747. def
  1748. /engineimage
  1749. {
  1750. //prtmatr
  1751. exec
  1752. //prtclip
  1753. exec
  1754. (<B )
  1755. print
  1756. pixelsWide
  1757. //prtnum
  1758. exec
  1759. pixelsHigh
  1760. //prtnum
  1761. exec
  1762. bitsPerSample
  1763. //prtnum
  1764. exec
  1765. samplesPerPixel
  1766. //prtnum
  1767. exec
  1768. isPlanar
  1769. {1}{0}
  1770. ifelse
  1771. //prtnum
  1772. exec
  1773. hasAlpha
  1774. {1}{0}
  1775. ifelse
  1776. //prtnum
  1777. exec
  1778. imageMatrix
  1779. {//prtnum
  1780. exec}
  1781. forall
  1782. /stdout
  1783. (%stdout)(w)
  1784. file
  1785. def
  1786. /left
  1787. bitsPerSample
  1788. samplesPerPixel
  1789. mul
  1790. pixelsWide
  1791. mul
  1792. 7
  1793. add
  1794. 8
  1795. idiv
  1796. dataSrcs
  1797. length
  1798. idiv
  1799. pixelsHigh
  1800. mul
  1801. def
  1802. /used
  1803. 0
  1804. def
  1805. dataSrcs
  1806. 0
  1807. get
  1808. type
  1809. /stringtype
  1810. eq
  1811. {
  1812. {
  1813. dataSrcs
  1814. {
  1815. dup
  1816. length
  1817. left
  1818. gt
  1819. {
  1820. 0
  1821. left
  1822. getinterval
  1823. }
  1824. if
  1825. dup
  1826. length
  1827. dup
  1828. /used
  1829. exch
  1830. def
  1831. 0
  1832. eq
  1833. {pop
  1834. exit}
  1835. if
  1836. stdout
  1837. exch
  1838. writehexstring
  1839. (\n)
  1840. print
  1841. }
  1842. forall
  1843. used
  1844. 0
  1845. eq
  1846. {exit}
  1847. if
  1848. /left
  1849. left
  1850. used
  1851. sub
  1852. def
  1853. left
  1854. 0
  1855. le
  1856. {exit}
  1857. if
  1858. }
  1859. loop
  1860. }
  1861. {
  1862. dataSrcs
  1863. 0
  1864. get
  1865. type
  1866. /filetype
  1867. eq
  1868. {
  1869. {
  1870. dataSrcs
  1871. {
  1872. //holdstring
  1873. dup
  1874. length
  1875. left
  1876. gt
  1877. {
  1878. 0
  1879. left
  1880. getinterval
  1881. }
  1882. if
  1883. readstring
  1884. exch
  1885. dup
  1886. length
  1887. dup
  1888. /used
  1889. exch
  1890. def
  1891. 0
  1892. eq
  1893. {pop
  1894. pop
  1895. exit}
  1896. if
  1897. stdout
  1898. exch
  1899. writehexstring
  1900. (\n)
  1901. print
  1902. not
  1903. {/used
  1904. 0
  1905. def
  1906. exit}
  1907. if
  1908. }
  1909. forall
  1910. used
  1911. 0
  1912. eq
  1913. {exit}
  1914. if
  1915. /left
  1916. left
  1917. used
  1918. sub
  1919. def
  1920. left
  1921. 0
  1922. le
  1923. {exit}
  1924. if
  1925. }
  1926. loop
  1927. }
  1928. {
  1929. {
  1930. dataSrcs
  1931. {
  1932. exec
  1933. dup
  1934. length
  1935. left
  1936. gt
  1937. {
  1938. 0
  1939. left
  1940. getinterval
  1941. }
  1942. if
  1943. dup
  1944. length
  1945. dup
  1946. /used
  1947. exch
  1948. def
  1949. 0
  1950. eq
  1951. {pop
  1952. exit}
  1953. if
  1954. stdout
  1955. exch
  1956. writehexstring
  1957. (\n)
  1958. print
  1959. }
  1960. forall
  1961. used
  1962. 0
  1963. eq
  1964. {exit}
  1965. if
  1966. /left
  1967. left
  1968. used
  1969. sub
  1970. def
  1971. left
  1972. 0
  1973. le
  1974. {exit}
  1975. if
  1976. }
  1977. loop
  1978. }
  1979. ifelse
  1980. }
  1981. ifelse
  1982. (>\n)
  1983. print
  1984. //showprogress
  1985. exec
  1986. }
  1987. bind
  1988. def
  1989. /image
  1990. {
  1991. //enginecache
  1992. /bitmap
  1993. get
  1994. begin
  1995. dup
  1996. type
  1997. /dicttype
  1998. eq
  1999. {
  2000. dup
  2001. /ImageMatrix
  2002. get
  2003. /imageMatrix
  2004. exch
  2005. def
  2006. dup
  2007. /Height
  2008. get
  2009. /pixelsHigh
  2010. exch
  2011. def
  2012. dup
  2013. /Width
  2014. get
  2015. /pixelsWide
  2016. exch
  2017. def
  2018. dup
  2019. /MultipleDataSources
  2020. known
  2021. {dup
  2022. /MultipleDataSources
  2023. get}{false}
  2024. ifelse
  2025. /isPlanar
  2026. exch
  2027. def
  2028. dup
  2029. /DataSource
  2030. get
  2031. isPlanar
  2032. not
  2033. {[
  2034. exch
  2035. ]}
  2036. if
  2037. /dataSrcs
  2038. exch
  2039. def
  2040. dup
  2041. /BitsPerComponent
  2042. get
  2043. /bitsPerSample
  2044. exch
  2045. def
  2046. dup
  2047. /Decode
  2048. get
  2049. length
  2050. 2
  2051. idiv
  2052. /samplesPerPixel
  2053. exch
  2054. def
  2055. pop
  2056. /hasAlpha
  2057. false
  2058. def
  2059. }{
  2060. /dataSrcs
  2061. exch
  2062. [
  2063. exch
  2064. ]
  2065. def
  2066. /imageMatrix
  2067. exch
  2068. def
  2069. /bitsPerSample
  2070. exch
  2071. def
  2072. /pixelsHigh
  2073. exch
  2074. def
  2075. /pixelsWide
  2076. exch
  2077. def
  2078. /samplesPerPixel
  2079. 1
  2080. def
  2081. /isPlanar
  2082. false
  2083. def
  2084. /hasAlpha
  2085. false
  2086. def
  2087. }
  2088. ifelse
  2089. //engineimage
  2090. exec
  2091. end
  2092. }
  2093. bind
  2094. def
  2095. /colorimage
  2096. {
  2097. //enginecache
  2098. /bitmap
  2099. get
  2100. begin
  2101. /samplesPerPixel
  2102. exch
  2103. def
  2104. /isPlanar
  2105. exch
  2106. def
  2107. isPlanar
  2108. {samplesPerPixel}
  2109. {1}
  2110. ifelse
  2111. array
  2112. astore
  2113. /dataSrcs
  2114. exch
  2115. def
  2116. /imageMatrix
  2117. exch
  2118. def
  2119. /bitsPerSample
  2120. exch
  2121. def
  2122. /pixelsHigh
  2123. exch
  2124. def
  2125. /pixelsWide
  2126. exch
  2127. def
  2128. /hasAlpha
  2129. false
  2130. def
  2131. //engineimage
  2132. exec
  2133. end
  2134. }
  2135. bind
  2136. def
  2137. /alphaimage
  2138. {
  2139. //enginecache
  2140. /bitmap
  2141. get
  2142. begin
  2143. /samplesPerPixel
  2144. exch
  2145. 1
  2146. add
  2147. def
  2148. /isPlanar
  2149. exch
  2150. def
  2151. isPlanar
  2152. {samplesPerPixel}
  2153. {1}
  2154. ifelse
  2155. array
  2156. astore
  2157. /dataSrcs
  2158. exch
  2159. def
  2160. /imageMatrix
  2161. exch
  2162. def
  2163. /bitsPerSample
  2164. exch
  2165. def
  2166. /pixelsHigh
  2167. exch
  2168. def
  2169. /pixelsWide
  2170. exch
  2171. def
  2172. /hasAlpha
  2173. true
  2174. def
  2175. //engineimage
  2176. exec
  2177. end
  2178. }
  2179. bind
  2180. def
  2181. /imagemask
  2182. {
  2183. //enginecache
  2184. /bitmap
  2185. get
  2186. begin
  2187. dup
  2188. type
  2189. /dicttype
  2190. eq
  2191. {
  2192. dup
  2193. /ImageMatrix
  2194. get
  2195. /imageMatrix
  2196. exch
  2197. def
  2198. dup
  2199. /Height
  2200. get
  2201. /pixelsHigh
  2202. exch
  2203. def
  2204. dup
  2205. /Width
  2206. get
  2207. /pixelsWide
  2208. exch
  2209. def
  2210. dup
  2211. /MultipleDataSources
  2212. known
  2213. {dup
  2214. /MultipleDataSources
  2215. get}{false}
  2216. ifelse
  2217. /isPlanar
  2218. exch
  2219. def
  2220. dup
  2221. /DataSource
  2222. get
  2223. isPlanar
  2224. not
  2225. {[
  2226. exch
  2227. ]}
  2228. if
  2229. /dataSrcs
  2230. exch
  2231. def
  2232. /bitsPerSample
  2233. 1
  2234. def
  2235. /samplesPerPixel
  2236. 1
  2237. def
  2238. pop
  2239. /hasAlpha
  2240. false
  2241. def
  2242. }{
  2243. /dataSrcs
  2244. exch
  2245. [
  2246. exch
  2247. ]
  2248. def
  2249. /imageMatrix
  2250. exch
  2251. def
  2252. pop
  2253. /pixelsHigh
  2254. exch
  2255. def
  2256. /pixelsWide
  2257. exch
  2258. def
  2259. /bitsPerSample
  2260. 1
  2261. def
  2262. /samplesPerPixel
  2263. 1
  2264. def
  2265. /isPlanar
  2266. false
  2267. def
  2268. /hasAlpha
  2269. false
  2270. def
  2271. }
  2272. ifelse
  2273. //engineimage
  2274. exec
  2275. end
  2276. }
  2277. bind
  2278. def
  2279. /TailorBeginDocument
  2280. {
  2281. //prtclip
  2282. exec
  2283. (<G )
  2284. print
  2285. print
  2286. (>\n)
  2287. print
  2288. }
  2289. bind
  2290. def
  2291. /TailorEndDocument
  2292. {
  2293. //prtclip
  2294. exec
  2295. (<E )
  2296. print
  2297. print
  2298. (>\n)
  2299. print
  2300. }
  2301. bind
  2302. def
  2303. /TailorBeginPage
  2304. {
  2305. //prtclip
  2306. exec
  2307. (<N )
  2308. print
  2309. print
  2310. (>\n)
  2311. print
  2312. }
  2313. bind
  2314. def
  2315. /showpage
  2316. {
  2317. (<N 0>\n)
  2318. print
  2319. }
  2320. bind
  2321. def
  2322. /erasepage
  2323. {
  2324. }
  2325. bind
  2326. def
  2327. /NXRectPath
  2328. {
  2329. 4
  2330. 2
  2331. roll
  2332. moveto
  2333. 1
  2334. index
  2335. 0
  2336. rlineto
  2337. 0
  2338. exch
  2339. rlineto
  2340. neg
  2341. 0
  2342. rlineto
  2343. closepath
  2344. }
  2345. bind
  2346. def
  2347. /NXProcessRectArgs
  2348. {
  2349. 1
  2350. index
  2351. type
  2352. /arraytype
  2353. eq{
  2354. exch
  2355. 0
  2356. 4
  2357. 2
  2358. index
  2359. length
  2360. 1
  2361. sub{
  2362. dup
  2363. 3
  2364. add
  2365. 1
  2366. exch{1
  2367. index
  2368. exch
  2369. get
  2370. exch}for
  2371. 5
  2372. 1
  2373. roll
  2374. 5
  2375. index
  2376. exec
  2377. }for
  2378. pop
  2379. pop
  2380. }{exec}ifelse
  2381. }
  2382. bind
  2383. def
  2384. /rectfill
  2385. {
  2386. gsave
  2387. newpath
  2388. {//NXRectPath
  2389. exec
  2390. fill}
  2391. //NXProcessRectArgs
  2392. exec
  2393. grestore
  2394. }
  2395. bind
  2396. def
  2397. /rectclip
  2398. {
  2399. newpath
  2400. {//NXRectPath
  2401. exec}
  2402. //NXProcessRectArgs
  2403. exec
  2404. clip
  2405. newpath
  2406. }
  2407. bind
  2408. def
  2409. /rectstroke
  2410. {
  2411. gsave
  2412. newpath
  2413. dup
  2414. type
  2415. /arraytype
  2416. eq
  2417. {dup
  2418. length
  2419. 6
  2420. eq}
  2421. {false}
  2422. ifelse
  2423. {
  2424. {gsave
  2425. //NXRectPath
  2426. exec
  2427. null
  2428. concat
  2429. stroke
  2430. grestore}
  2431. dup
  2432. length
  2433. array
  2434. cvx
  2435. copy
  2436. dup
  2437. 3
  2438. 4
  2439. -1
  2440. roll
  2441. put
  2442. //NXProcessRectArgs
  2443. exec
  2444. }
  2445. {
  2446. {//NXRectPath
  2447. exec
  2448. stroke}
  2449. //NXProcessRectArgs
  2450. exec
  2451. }
  2452. ifelse
  2453. grestore
  2454. }
  2455. bind
  2456. def
  2457. /xyshow
  2458. {
  2459. 0
  2460. 1
  2461. 3
  2462. index
  2463. length
  2464. 1
  2465. sub{
  2466. currentpoint
  2467. 4
  2468. index
  2469. 3
  2470. index
  2471. 1
  2472. getinterval
  2473. show
  2474. 3
  2475. index
  2476. 3
  2477. index
  2478. 2
  2479. mul
  2480. 1
  2481. add
  2482. get
  2483. add
  2484. exch
  2485. 3
  2486. index
  2487. 3
  2488. index
  2489. 2
  2490. mul
  2491. get
  2492. add
  2493. exch
  2494. moveto
  2495. pop
  2496. }for
  2497. pop
  2498. pop
  2499. }
  2500. bind
  2501. def
  2502. /xshow
  2503. {
  2504. 0
  2505. 1
  2506. 3
  2507. index
  2508. length
  2509. 1
  2510. sub{
  2511. currentpoint
  2512. 4
  2513. index
  2514. 3
  2515. index
  2516. 1
  2517. getinterval
  2518. show
  2519. exch
  2520. 3
  2521. index
  2522. 3
  2523. index
  2524. get
  2525. add
  2526. exch
  2527. moveto
  2528. pop
  2529. }for
  2530. pop
  2531. pop
  2532. }
  2533. bind
  2534. def
  2535. /yshow
  2536. {
  2537. 0
  2538. 1
  2539. 3
  2540. index
  2541. length
  2542. 1
  2543. sub{
  2544. currentpoint
  2545. 4
  2546. index
  2547. 3
  2548. index
  2549. 1
  2550. getinterval
  2551. show
  2552. 3
  2553. index
  2554. 3
  2555. index
  2556. get
  2557. add
  2558. moveto
  2559. pop
  2560. }for
  2561. pop
  2562. pop
  2563. }
  2564. bind
  2565. def
  2566. /ueofill
  2567. {
  2568. gsave
  2569. newpath
  2570. uappend
  2571. eofill
  2572. grestore
  2573. }
  2574. bind
  2575. def
  2576. /ufill
  2577. {
  2578. gsave
  2579. newpath
  2580. uappend
  2581. fill
  2582. grestore
  2583. }
  2584. bind
  2585. def
  2586. /ustroke
  2587. {
  2588. gsave
  2589. newpath
  2590. dup
  2591. length
  2592. 6
  2593. eq
  2594. {exch
  2595. uappend
  2596. concat}{uappend}ifelse
  2597. stroke
  2598. grestore
  2599. }
  2600. bind
  2601. def
  2602. /execform
  2603. {
  2604. dup
  2605. /Implementation
  2606. known
  2607. not
  2608. {
  2609. dup
  2610. /Implementation
  2611. 0
  2612. put
  2613. readonly
  2614. }
  2615. if
  2616. gsave
  2617. dup
  2618. /Matrix
  2619. get
  2620. concat
  2621. dup
  2622. /BBox
  2623. get
  2624. aload
  2625. pop
  2626. exch
  2627. 3
  2628. index
  2629. sub
  2630. exch
  2631. 2
  2632. index
  2633. sub
  2634. rectclip
  2635. dup
  2636. /PaintProc
  2637. get
  2638. exec
  2639. grestore
  2640. }
  2641. bind
  2642. def
  2643. /put
  2644. {
  2645. 1
  2646. index
  2647. /FontName
  2648. ne
  2649. {put}
  2650. {
  2651. 2
  2652. index
  2653. 2
  2654. index
  2655. known
  2656. {pop
  2657. pop
  2658. pop}
  2659. {put}
  2660. ifelse
  2661. }
  2662. ifelse
  2663. }
  2664. bind
  2665. def
  2666. /setpapersize
  2667. {pop}
  2668. bind
  2669. def
  2670. userdict
  2671. begin
  2672. /11x17
  2673. {
  2674. initmatrix
  2675. }
  2676. def
  2677. /tabloid
  2678. {
  2679. initmatrix
  2680. }
  2681. def
  2682. /a2
  2683. {
  2684. initmatrix
  2685. }
  2686. def
  2687. /a3
  2688. {
  2689. initmatrix
  2690. }
  2691. def
  2692. /a4
  2693. {
  2694. initmatrix
  2695. }
  2696. def
  2697. /a4small
  2698. {
  2699. initmatrix
  2700. }
  2701. def
  2702. /a5
  2703. {
  2704. initmatrix
  2705. }
  2706. def
  2707. /b4
  2708. {
  2709. initmatrix
  2710. }
  2711. def
  2712. /b5
  2713. {
  2714. initmatrix
  2715. }
  2716. def
  2717. /executive
  2718. {
  2719. initmatrix
  2720. }
  2721. def
  2722. /ledger
  2723. {
  2724. initmatrix
  2725. }
  2726. def
  2727. /legal
  2728. {
  2729. initmatrix
  2730. }
  2731. def
  2732. /letter
  2733. {
  2734. initmatrix
  2735. }
  2736. def
  2737. /lettersmall
  2738. {
  2739. initmatrix
  2740. }
  2741. def
  2742. end
  2743. statusdict
  2744. begin
  2745. /processcolors
  2746. {
  2747. 3
  2748. }
  2749. def
  2750. end
  2751. (* )
  2752. print
  2753. product
  2754. print
  2755. ( - revision )
  2756. print
  2757. revision
  2758. prtnum
  2759. (*\n)
  2760. print
  2761. (<V )
  2762. print
  2763. holdmatrix
  2764. defaultmatrix
  2765. {prtnum}
  2766. forall
  2767. (>\n)
  2768. print
  2769.  
  2770.